package db;

import java.util.LinkedList;
import java.util.List;

public class User {

	private String name; 
	private List<File> myFiles;
	private String folderLocation;
	
	public User(){
		myFiles = new LinkedList<File>();
		//open new empty Folder for him- how to create new folder on desktop?
		folderLocation = new String("Desktop");
	}
	
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
	
	public void addFile(File f){
		myFiles.add(f);
	}
	
	public boolean removeFile(int id){
		
		if (myFiles.isEmpty()) return false;
		
		for (File f: myFiles)
			if (f.getId()== id){
				myFiles.remove(f);
				return true;
			}	
		
		return false;
		
	}
	
	
	public List<File> getMyFiles() {
		return myFiles;
	}
	
	
	
	
}
